Optimal. Leaf size=109 \[ \frac {\left (b^2 c^2+a b c d+a^2 d^2\right ) x}{b^3 d^3}-\frac {(b c+a d) x^2}{2 b^2 d^2}+\frac {x^3}{3 b d}+\frac {a^4 \log (a+b x)}{b^4 (b c-a d)}-\frac {c^4 \log (c+d x)}{d^4 (b c-a d)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 109, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {84}
\begin {gather*} \frac {a^4 \log (a+b x)}{b^4 (b c-a d)}+\frac {x \left (a^2 d^2+a b c d+b^2 c^2\right )}{b^3 d^3}-\frac {x^2 (a d+b c)}{2 b^2 d^2}-\frac {c^4 \log (c+d x)}{d^4 (b c-a d)}+\frac {x^3}{3 b d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 84
Rubi steps
\begin {align*} \int \frac {x^4}{(a+b x) (c+d x)} \, dx &=\int \left (\frac {b^2 c^2+a b c d+a^2 d^2}{b^3 d^3}-\frac {(b c+a d) x}{b^2 d^2}+\frac {x^2}{b d}+\frac {a^4}{b^3 (b c-a d) (a+b x)}+\frac {c^4}{d^3 (-b c+a d) (c+d x)}\right ) \, dx\\ &=\frac {\left (b^2 c^2+a b c d+a^2 d^2\right ) x}{b^3 d^3}-\frac {(b c+a d) x^2}{2 b^2 d^2}+\frac {x^3}{3 b d}+\frac {a^4 \log (a+b x)}{b^4 (b c-a d)}-\frac {c^4 \log (c+d x)}{d^4 (b c-a d)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 105, normalized size = 0.96 \begin {gather*} \frac {b d (b c-a d) x \left (6 a^2 d^2-3 a b d (-2 c+d x)+b^2 \left (6 c^2-3 c d x+2 d^2 x^2\right )\right )+6 a^4 d^4 \log (a+b x)-6 b^4 c^4 \log (c+d x)}{6 b^4 d^4 (b c-a d)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 110, normalized size = 1.01
method | result | size |
norman | \(\frac {\left (a^{2} d^{2}+a b c d +b^{2} c^{2}\right ) x}{b^{3} d^{3}}+\frac {x^{3}}{3 b d}-\frac {\left (a d +b c \right ) x^{2}}{2 b^{2} d^{2}}+\frac {c^{4} \ln \left (d x +c \right )}{d^{4} \left (a d -b c \right )}-\frac {a^{4} \ln \left (b x +a \right )}{b^{4} \left (a d -b c \right )}\) | \(106\) |
default | \(\frac {\frac {1}{3} d^{2} x^{3} b^{2}-\frac {1}{2} a b \,d^{2} x^{2}-\frac {1}{2} b^{2} c d \,x^{2}+a^{2} d^{2} x +a b c d x +b^{2} c^{2} x}{b^{3} d^{3}}-\frac {a^{4} \ln \left (b x +a \right )}{b^{4} \left (a d -b c \right )}+\frac {c^{4} \ln \left (d x +c \right )}{d^{4} \left (a d -b c \right )}\) | \(110\) |
risch | \(\frac {x^{3}}{3 b d}-\frac {a \,x^{2}}{2 b^{2} d}-\frac {c \,x^{2}}{2 b \,d^{2}}+\frac {a^{2} x}{b^{3} d}+\frac {a c x}{b^{2} d^{2}}+\frac {c^{2} x}{b \,d^{3}}-\frac {a^{4} \ln \left (b x +a \right )}{b^{4} \left (a d -b c \right )}+\frac {c^{4} \ln \left (-d x -c \right )}{d^{4} \left (a d -b c \right )}\) | \(119\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.31, size = 113, normalized size = 1.04 \begin {gather*} \frac {a^{4} \log \left (b x + a\right )}{b^{5} c - a b^{4} d} - \frac {c^{4} \log \left (d x + c\right )}{b c d^{4} - a d^{5}} + \frac {2 \, b^{2} d^{2} x^{3} - 3 \, {\left (b^{2} c d + a b d^{2}\right )} x^{2} + 6 \, {\left (b^{2} c^{2} + a b c d + a^{2} d^{2}\right )} x}{6 \, b^{3} d^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.87, size = 122, normalized size = 1.12 \begin {gather*} \frac {6 \, a^{4} d^{4} \log \left (b x + a\right ) - 6 \, b^{4} c^{4} \log \left (d x + c\right ) + 2 \, {\left (b^{4} c d^{3} - a b^{3} d^{4}\right )} x^{3} - 3 \, {\left (b^{4} c^{2} d^{2} - a^{2} b^{2} d^{4}\right )} x^{2} + 6 \, {\left (b^{4} c^{3} d - a^{3} b d^{4}\right )} x}{6 \, {\left (b^{5} c d^{4} - a b^{4} d^{5}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 255 vs.
\(2 (97) = 194\).
time = 0.96, size = 255, normalized size = 2.34 \begin {gather*} - \frac {a^{4} \log {\left (x + \frac {\frac {a^{6} d^{5}}{b \left (a d - b c\right )} - \frac {2 a^{5} c d^{4}}{a d - b c} + \frac {a^{4} b c^{2} d^{3}}{a d - b c} + a^{4} c d^{3} + a b^{3} c^{4}}{a^{4} d^{4} + b^{4} c^{4}} \right )}}{b^{4} \left (a d - b c\right )} + \frac {c^{4} \log {\left (x + \frac {a^{4} c d^{3} - \frac {a^{2} b^{3} c^{4} d}{a d - b c} + \frac {2 a b^{4} c^{5}}{a d - b c} + a b^{3} c^{4} - \frac {b^{5} c^{6}}{d \left (a d - b c\right )}}{a^{4} d^{4} + b^{4} c^{4}} \right )}}{d^{4} \left (a d - b c\right )} + x^{2} \left (- \frac {a}{2 b^{2} d} - \frac {c}{2 b d^{2}}\right ) + x \left (\frac {a^{2}}{b^{3} d} + \frac {a c}{b^{2} d^{2}} + \frac {c^{2}}{b d^{3}}\right ) + \frac {x^{3}}{3 b d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.19, size = 119, normalized size = 1.09 \begin {gather*} \frac {a^{4} \log \left ({\left | b x + a \right |}\right )}{b^{5} c - a b^{4} d} - \frac {c^{4} \log \left ({\left | d x + c \right |}\right )}{b c d^{4} - a d^{5}} + \frac {2 \, b^{2} d^{2} x^{3} - 3 \, b^{2} c d x^{2} - 3 \, a b d^{2} x^{2} + 6 \, b^{2} c^{2} x + 6 \, a b c d x + 6 \, a^{2} d^{2} x}{6 \, b^{3} d^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.47, size = 106, normalized size = 0.97 \begin {gather*} x\,\left (\frac {{\left (a\,d+b\,c\right )}^2}{b^3\,d^3}-\frac {a\,c}{b^2\,d^2}\right )+\frac {x^3}{3\,b\,d}-\frac {a^4\,\ln \left (a+b\,x\right )}{b^4\,\left (a\,d-b\,c\right )}+\frac {c^4\,\ln \left (c+d\,x\right )}{d^4\,\left (a\,d-b\,c\right )}-\frac {x^2\,\left (a\,d+b\,c\right )}{2\,b^2\,d^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________